package com.huqing.icu.sdk.config;

import io.minio.MinioClient;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description minio配置类
 * @Author huqing
 * @Date 2025/9/17 16:13
 **/
@Configuration
@Data
public class MinioConfig {

    @Value("${sdk.minio.access-key:}")
    private String accessKey;

    @Value("${sdk.minio.secret-key:}")
    private String secretKey;

    @Value("${sdk.minio.url:}")
    private String url;

    @Value("${sdk.minio.know-budget-name:}")
    private String knowBudgetName;

    @Value("${sdk.minio.common-budget-name:}")
    private String commonBudgetName;

    @Bean
    public MinioClient minioClient() {
        return MinioClient.builder().endpoint(url).credentials(accessKey, secretKey).build();
    }
}
